<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1.字面量
        const obj1 = {
            name:'zs',
            age:18
        }
        console.log(obj1);

        // 2. new 一个对象
        const obj2 = new Object()
        obj2.name = '车银优'
        obj2.age = 24
        console.log(obj2);

        // 3.构造函数
        function Obj3(name,age){
            this.name = name
            this.age = age
        }
        const obj = new Obj3('ls',20)
        console.log(obj);
    </script>
</body>
</html>